<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	{js:jquery}
	<link href="{webroot:public/css/twitter-bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet">
	<script src="{webroot:public/javascript/twitter-bootstrap/3.3.7/js/bootstrap.min.js}"></script>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body>
<div class="container">
	<table class="table table-bordered">
		<caption>
			黑名单商家
		</caption>

		<colgroup>
			<col width="180px" />
			<col />
			<col width="150px" />
			<col width="250px" />
		</colgroup>

		<thead>
		<tr>
			<th>商家用户名</th>
			<th>商家真实名称</th>
			<th>房间名称</th>
			<th>操作</th>
		</tr>
		</thead>
		{if:count($forbidData['StreamUrls']) > 0}
		<tbody>
		{foreach:items = $forbidData['StreamUrls']}
		<tr>
			<td>{$item['seller_name']}</td>
			<td>{$item['true_name']}</td>
			<td>{$item['room_name']}</td>
			<td>
				<button type="button" class="btn btn-success" onclick="startRoom('{$item['seller_id']}')">启用房间</button>
				<button type="button" class="btn btn-info" onclick="window.location.href='{url:/plugins/stream_publish_list/seller_id/$item['seller_id']}';">直播记录</button>
			</td>
		</tr>
		{/foreach}
		</tbody>
		{else:}
		<tfoot>
		<tr>
			<th colspan="4">
				对不起，没有找到黑名单商家数据
			</th>
		</tr>
		</tfoot>
		{/if}
	</table>
	{$pageObj->getPageBar()}
</div>
</body>
<script>
    function startRoom(seller_id) {
        $.getJSON("{url:/plugins/resume_live_stream}",{"seller_id":seller_id},function(json)
        {
            if(json.result == 'success')
            {
                window.location.reload();
            }
            else
            {
                alert('启用失败');
            }
        });
    }
</script>
</html>